<?php

namespace app\order\model;

use think\Model;
use think\Db;

class OrderGoods extends Model
{
    // 设置当前模型对应的完整数据表名称
    protected $table = 'xb_order_goods';

    // 订单内商品
    public function getGoods($orderId=array())
    {
        if( empty($orderId) ) return false;

        $list = $this->where('order_id', 'in', $orderId)->select();
        return collection($list)->toArray();
        //return $list;
    }
}